// 购物车
const {DataTypes, db } = require("../db");
db.define('cart', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
uid:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
buId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
invId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
price:{type: DataTypes.DECIMAL(10, 2),defaultValue:0,comment:''}, 
amount:{type: DataTypes.DECIMAL(12, 2),defaultValue:0,comment:''}, 
deduction:{type: DataTypes.DECIMAL(8, 2),defaultValue:0,comment:''}, 
send:{type: DataTypes.STRING(50),defaultValue:(''),comment:''}, 
unit:{type: DataTypes.STRING(12),allowNull:false,comment:''}, 
qty:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
remark:{type: DataTypes.STRING(255),comment:''}, 
checked:{type: DataTypes.INTEGER,defaultValue:1,comment:''}, 
unitId:{type: DataTypes.INTEGER,comment:''}, 

}, {
    tableName: 'cart',
    timestamps: false,
    comment: '购物车',
    
});